package org.icop.frame.select;

import java.util.Set;

import org.icop.frame.eval.Evaluator;
import org.icop.model.MultiSet;
import org.icop.model.ValuedCorrespondence;
import org.jbpt.graph.abs.IEdge;
import org.jbpt.graph.abs.IGraph;
import org.jbpt.hypergraph.abs.IVertex;

public interface Selector<G extends IGraph<E,V>, E extends IEdge<V>, V extends IVertex> {

	/**
	 * Given two graphs and a mapping between those graphs, 'cleans up' the given mapping. 
	 * The result should be the mapping that is returned to the process analyst.
	 * Should always be implemented, such that 'initEvaluator' is called on an evaluator, before
	 * that evaluator is first used.
	 * 
	 * @param sg1 Mapped graph.
	 * @param sg2 Mapped graph.
	 * @param mapping Mapping such that for each (s1,s2) \in mapping: (s1,s2) \subseteq sg1.getVertices() \times sg2.getVertices().
	 * @return The quality of the mapping.
	 */
	public Set<ValuedCorrespondence<V>> select(G sg1, G sg2, Evaluator<G, E, V> evaluator, MultiSet<ValuedCorrespondence<V>> mapping);
	
}
